package com.zhubayi.entity;

import com.zhubayi.constant.MyConstant;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author 祝八一
 */
@AllArgsConstructor
@Data
public class R<T> {
    private Integer code;
    private String message;

    private T data;

    public R( Integer code,String message) {
        this.message = message;
        this.code = code;
    }


    public R(MyConstant ok) {
        this.message = ok.getMessage();
        this.code = ok.getCode();
    }

    public R(MyConstant ok,T data) {
        this.message = ok.getMessage();
        this.code = ok.getCode();
        this.data=data;

    }
}
